English
Register DDNS (Optional)
If you do not plan to access your server outside of your local network, or if you have a static public IP and your own domain, you can skip this section.
This guide will use the DuckDNS.org service as DDNS in order to map a subdomain to our server. We will register a subdomain on DuckDNS.org and configure our server to update the IP on DuckDNS.org.
Steps
- Register a subdomain on DuckDNS.org.
- Access and create an account at https://www.duckdns.org/.
- Register a subdomain of your preference. Write down the generated token because we are going to need it next.
- Copy the script that updates the DDNS with our public IP to
sbin:cp ./scripts/duck.sh /usr/local/sbin/. - Edit the script:
nano /usr/local/sbin/duck.sh. ReplaceXXXwith the subdomain we registered andYYYwith the token we generated during registration. Save and exit withCtrl + X, Y, Enter. - We change the permissions of the script so that only
rootcan access it:chmod 700 /usr/local/sbin/duck.sh. The script contains our token, which is the only thing that allows only us to change the IP to which the subdomain points, hence the importance of securing it.